import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';
import CV from '../views/CV.vue';
import ToDoList from '../views/ToDoList.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'new-home',
      component: HomeView
    },
    {
      path: '/cv',
      name: 'cv',
      component: CV
    },
    {
      path: '/todolist',
      name: 'todolist',
      component: ToDoList
    }
  ]
});

router.beforeEach((to, from, next) => {
  next();
});

export default router;